<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <script src="https://cdn.polyfill.io/v1/polyfill.js?features=Element.prototype.closest"></script>
  <style>
    .voter {
      font-family: 'DejaVu Sans Mono', 'Lucida Console', 'Menlo', 'Monaco', monospace;
      font-size: 18px;
    }

    .up,
    .down {
      cursor: pointer;
      color: blue;
      font-weight: bold;
    }
  </style>
</head>

<body>

  <div id="voter" class="voter">
    <span class="down">—</span>
    <span class="vote">0</span>
    <span class="up">+</span>
  </div>

  <script>
    function Voter(options) {
      var elem = options.elem;

      var voteElem = elem.querySelector('.vote');

      elem.onclick = function(event) {
        // сам обработчик не меняет голос, он вызывает функцию
        if (event.target.closest('.down')) {
          voteDecrease();
        } else if (event.target.closest('.up')) {
          voteIncrease();
        }
      }

      elem.onmousedown = function() {
        return false;
      };

      // ----------- методы -------------

      function voteDecrease() {
        voteElem.innerHTML = +voteElem.innerHTML - 1;
      }

      function voteIncrease() {
        voteElem.innerHTML = +voteElem.innerHTML + 1;
      }

      this.setVote = function(vote) {
        voteElem.innerHTML = +vote;
      };

    }

    var voter = new Voter({
      elem: document.getElementById('voter')
    });
    voter.setVote(1);
  </script>

</body>

</html>
